//
//  KLTool.h
//  WebRTCDemo_iOS
//
//  Created by szblsx2 on 2020/3/5.
//  Copyright © 2020 szblsx2. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface KLTool : NSObject

/**
*  获取随机id(7位数)
*/
+ (NSInteger)toRandomId;

/**
*  字典转data
*  @param dict    字典对象
*/
+ (NSData *)dictToData:(NSDictionary *)dict;

/**
*  字典转json
*  @param dict    字典对象
*/
+ (NSString *)dictToJson:(NSDictionary *)dict;

/**
*  json转字典
*  @param jsonString    JSON串
*/
+ (NSDictionary *)jsonToDict:(NSString *)jsonString;

@end

NS_ASSUME_NONNULL_END
